<meta title="京东授权" />
<div class="p">
    <div class="p-b">
        <input autocomplete="off" type="button" class="btn btn-primary btn-sm" s-click="auth()" value="授权" />
        <input autocomplete="off" type="button" class="btn btn-default btn-sm" s-click="loadData()" value="刷新" />
    </div>
    <table  id="form" s="datac,nda" class="table table-bordered table-striped" style="width: 600px;">
        <tr>
            <th style="width: 100px;">授权用户</th>
            <td name="userNick"></td>
        </tr>
        <tr>
            <th>过期时间</th>
            <td name="expiresIn"></td>
        </tr>
    </table>
</div>
<script type="text/javascript">
	S.ready(function() {
		loadData()
	})
	function auth() {
		window.open('/api/jos/auth')
	}
	function loadData() {
		S.get('/api/setting/JdAuthSetting/0').done(function (rs) {
			$form.data(rs)
		})
	}
</script>